﻿using MediatR;
using RBAC.LuFang.API.Application.Command.MenuCommand;
using RBAC.LuFang.Domin.Services;

namespace RBAC.LuFang.API.Application.CommandHandlers.MenuHandler
{
    ////菜单删除（真删）
    public class MenuDeleteCommandHandler : IRequestHandler<MenuDeleteCommand, int>
    {
        private readonly IMenuService _MenuService;

        public MenuDeleteCommandHandler(IMenuService menuService)
        {
            _MenuService = menuService;
        }

        public async Task<int> Handle(MenuDeleteCommand request, CancellationToken cancellationToken)
        {
            return await _MenuService.MenuDel(request.menuid);
        }
    }
}
